package com.way.cloud.repository;

import com.way.cloud.domain.Customer;
import org.springframework.data.r2dbc.repository.Query;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Flux;

@Repository
public interface CustomerRepository extends ReactiveCrudRepository<Customer, Integer> {

    @Query("SELECT * FROM Customer WHERE lastName = :lastName")
    Flux<Customer> findByLastName(String lastName);

}
